import Vue from 'vue'
import { 
  Button,
  NavBar,
  Tabbar,TabbarItem,
  Swipe, SwipeItem,
  Grid,GridItem,
  Toast,
  Card,
  Tab, Tabs,
  Lazyload,
  Stepper,
  Switch,
  SubmitBar,
  Checkbox, CheckboxGroup
  // ImagePreview
} from 'vant'

// 注册时设置`lazyComponent`选项
Vue.use(Lazyload, {
  loading: 'https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=1273775662,242845634&fm=26&gp=0.jpg'
});

Vue
  .use(Button)
  .use(NavBar)
  .use(Tabbar)
  .use(TabbarItem)
  .use(Swipe)
  .use(SwipeItem)
  .use(Grid)
  .use(GridItem)
  .use(Card)
  .use(Tab)
  .use(Tabs)
  .use(Stepper)
  .use(Switch)
  .use(SubmitBar)
  .use(Checkbox)
  .use(CheckboxGroup)

// 优化Toast
Vue.prototype.$Toast = Toast
// Vue.prototype.$ImagePreview = ImagePreview
